import java.awt.Point;
import org.rsbot.script.methods.Calculations;
import org.rsbot.script.methods.Walking;
import org.rsbot.script.wrappers.RSObject;
import org.rsbot.script.wrappers.RSPlayer;
import org.rsbot.script.wrappers.RSTile;

class VoluntaryThieve$Actions$8 extends VoluntaryThieve.Action
{
  VoluntaryThieve.Action.State perform()
  {
    return VoluntaryThieve.access$5600(this.this$1.this$0).walkTo(new RSTile(4755 + VoluntaryThieve.Actions.access$1100(this.this$1).x, 5795 + VoluntaryThieve.Actions.access$1100(this.this$1).y)) ? VoluntaryThieve.Action.State.COMPLETED : VoluntaryThieve.Action.State.PROGRESSING;
  }

  VoluntaryThieve.Action.State confirm()
  {
    RSTile localRSTile = VoluntaryThieve.access$5700(this.this$1.this$0).getDestination();
    return (localRSTile != null) && (this.this$1.this$0.getMyPlayer().isMoving()) ? VoluntaryThieve.Action.State.COMPLETED : VoluntaryThieve.Action.State.PROGRESSING;
  }

  VoluntaryThieve.Action.State finish()
  {
    RSTile localRSTile = VoluntaryThieve.access$5800(this.this$1.this$0).getDestination();
    if (localRSTile == null) return VoluntaryThieve.Action.State.FAILED;

    RSObject localRSObject = VoluntaryThieve.Actions.Methods.access$5900(VoluntaryThieve.Actions.access$1700(this.this$1));
    if ((localRSObject != null) && (localRSObject.isOnScreen())) {
      return VoluntaryThieve.Action.State.COMPLETED;
    }
    if (VoluntaryThieve.access$6000(this.this$1.this$0).distanceTo(localRSTile) > this.this$1.this$0.random(5, 7))
      VoluntaryThieve.Antibans.access$4300(VoluntaryThieve.access$4200(this.this$1.this$0), new int[] { 0 }, this.this$1.this$0.random(17, 23));
    return VoluntaryThieve.access$6100(this.this$1.this$0).distanceTo(localRSTile) < this.this$1.this$0.random(3, 6) ? VoluntaryThieve.Action.State.COMPLETED : VoluntaryThieve.Action.State.PROGRESSING;
  }
}